package org.example.oop

/**
 * @ClassName Point.java
 * @author ylr
 * @version 1.0.0
 * @Description TODO
 * @createTime 2022年05月09日 09:59:00
 */
class Point(xc:Int, yc: Int) extends Equal {
  var x: Int = xc
  var y: Int = yc

  def move(dx: Int, dy: Int) {
    x = x + dx
    y = y + dy
    println ("x 的坐标点: " + x);
    println ("y 的坐标点: " + y);
  }

  def isEqual(obj: Any) =
    obj.isInstanceOf[Point] &&
      obj.asInstanceOf[Point].x == x
}
